package org.flashbrighton.as3bots.utils
{
	public class ArrayUtils
	{
		public static function shuffle(arr:Array):Array
		{
			var shuffled:Array = arr.slice();
			for (var i:int=0; i<arr.length; i++)
			{
		    var element:Object = shuffled[i];
		    var rnd:int = Math.floor(arr.length * Math.random());
		    shuffled[i] = shuffled[rnd];
		    shuffled[rnd] = element;
			}
			return shuffled;
		}

	}
}